package com.redoor.app.stake.auth.model;

import com.alibaba.druid.support.json.JSONUtils;
import com.redoor.app.stake.common.model.CompareResultBean;
import com.redoor.app.stake.common.utils.CompareUtil;
import com.redoor.app.stake.common.utils.JsonUtils;
import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.*;

@Table(name = "base_role")
public class BaseRole {
    /**
     * uuid
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String uuid;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称")
    @Column(name = "roleName")
    private String rolename;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 创建人Uuid
     */
    @Column(name = "creatorUuid")
    private String creatoruuid;

    /**
     * 创建时间
     */
    @Column(name = "createdAt")
    private Date createdat;

    /**
     * 修改人Uuid
     */
    @Column(name = "updaterUuid")
    private String updateruuid;

    /**
     * 修改时间
     */
    @Column(name = "updatedAt")
    private Date updatedat;

    /**
     * 获取uuid
     *
     * @return uuid - uuid
     */
    public String getUuid() {
        return uuid;
    }

    /**
     * 设置uuid
     *
     * @param uuid uuid
     */
    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    /**
     * 获取角色名称
     *
     * @return roleName - 角色名称
     */
    public String getRolename() {
        return rolename;
    }

    /**
     * 设置角色名称
     *
     * @param rolename 角色名称
     */
    public void setRolename(String rolename) {
        this.rolename = rolename;
    }

    /**
     * 获取状态
     *
     * @return status - 状态
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置状态
     *
     * @param status 状态
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取创建人Uuid
     *
     * @return creatorUuid - 创建人Uuid
     */
    public String getCreatoruuid() {
        return creatoruuid;
    }

    /**
     * 设置创建人Uuid
     *
     * @param creatoruuid 创建人Uuid
     */
    public void setCreatoruuid(String creatoruuid) {
        this.creatoruuid = creatoruuid;
    }

    /**
     * 获取创建时间
     *
     * @return createdAt - 创建时间
     */
    public Date getCreatedat() {
        return createdat;
    }

    /**
     * 设置创建时间
     *
     * @param createdat 创建时间
     */
    public void setCreatedat(Date createdat) {
        this.createdat = createdat;
    }

    /**
     * 获取修改人Uuid
     *
     * @return updaterUuid - 修改人Uuid
     */
    public String getUpdateruuid() {
        return updateruuid;
    }

    /**
     * 设置修改人Uuid
     *
     * @param updateruuid 修改人Uuid
     */
    public void setUpdateruuid(String updateruuid) {
        this.updateruuid = updateruuid;
    }

    /**
     * 获取修改时间
     *
     * @return updatedAt - 修改时间
     */
    public Date getUpdatedat() {
        return updatedat;
    }

    /**
     * 设置修改时间
     *
     * @param updatedat 修改时间
     */
    public void setUpdatedat(Date updatedat) {
        this.updatedat = updatedat;
    }

    public static void main(String[] args) throws IllegalAccessException, ClassNotFoundException {
        BaseRole r1 = new BaseRole();
        r1.setRolename("111");
        r1.setUuid("112");

        BaseRole r2 = new BaseRole();
        r2.setRolename("222");
        r2.setUuid("113");

        List<String> list = new ArrayList<>();
        //list.add("ROLENAME");

        List<CompareResultBean> mapList = CompareUtil.compareTwoClass(r1,r2,list);
        System.out.println(JsonUtils.toJson(mapList));
    }
}